#!/usr/local/bin/python3
#-*- coding:utf8 -*-
# Author Aaron 
# 2017-03-31 22:46:05

import RPi.GPIO as GPIO
import time

GPIO_PINS = [7,11,13]
count = 5
GPIO.setmode(GPIO.BOARD)
for pin in GPIO_PINS:
    GPIO.setup(pin,GPIO.OUT)
    GPIO.output(pin,GPIO.LOW)
    print("设置针脚",pin,"为输出")
while count > 0:
    for pin in GPIO_PINS:
        GPIO.output(pin,GPIO.HIGH)
        time.sleep(0.5)
        GPIO.output(pin,GPIO.LOW)
        time.sleep(0.5)
    count = count - 1
    print("循环",count,"次")        
#for pin in GPIO_PINS:
#    GPIO.output(pin,GPIO.LOW)
#    GPIO.setup(pin,GPIO.IN)
        
print("exit...")
GPIO.cleanup()
